package com.tgpms.web.assets.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.tgpms.util.PageView;
import com.tgpms.web.assets.entity.FaDisposal;
import com.tgpms.web.assets.entity.FaDisposalKey;

/**
* 表FA_DISPOSAL -> D8008固定资产处置 的基本功能实现
*
* @author newway
* @createDate 2019/08/01
*/
public interface FaDisposalMapper {
    /**
     * D8008固定资产处置  deleteByPrimaryKey 实现
     * 
     * @param key
     * @return null int
     * @author: newway
     * @createDate: 2019-08-01 16:07:14
     */
    int deleteByPrimaryKey(FaDisposalKey key);

    /**
     * D8008固定资产处置  insert 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-08-01 16:07:14
     */
    int insert(FaDisposal record);

    /**
     * D8008固定资产处置  insertSelective 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-08-01 16:07:14
     */
    int insertSelective(FaDisposal record);

    /**
     * D8008固定资产处置  selectByPrimaryKey 实现
     * 
     * @param key
     * @return null com.tgpms.web.assets.entity.FaDisposal
     * @author: newway
     * @createDate: 2019-08-01 16:07:14
     */
    FaDisposal selectByPrimaryKey(FaDisposalKey key);

    /**
     * D8008固定资产处置  updateByPrimaryKeySelective 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-08-01 16:07:14
     */
    int updateByPrimaryKeySelective(FaDisposal record);

    /**
     * D8008固定资产处置  updateByPrimaryKey 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-08-01 16:07:14
     */
    int updateByPrimaryKey(FaDisposal record);
    
    /**
	* @Author newway
	* @Description 查询固定资产处置接口信息分页
	* @Date 2019年8月2日下午5:30:01
	* @Param com.tgpms.util.PageView
	* @return List<FaDisposal>
	**/
    List<FaDisposal> queryByCondition(@Param("pageView")PageView pageView);

    List<FaDisposal> queryByIdAndDesc(@Param("pageView")PageView pageView);
    /**
     * 获取最大编号
     * @return
     */
    @Select("select MAX(DISPOSAL_NO) from FA_DISPOSAL where FIXED_ASSET_NO=#{fixedAssetNo}")
    String getMaxDisposalNo(@Param("fixedAssetNo") String fixedAssetNo);
}